﻿<%@ Page Language="C#" MasterPageFile="~/Admin/MasterPage.master" AutoEventWireup="true" CodeFile="ListUserGuide.aspx.cs" Inherits="Admin_ListAccounts" Title="Untitled Page" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="Server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="Server">
    <div id="postedit" class="clearfix">
        <h2 class="ico_mug">
            List User Guide
        </h2>
        <asp:HyperLink ID="hyp" runat="server" NavigateUrl="~/Admin/UserGuide.aspx">Add New User Guide</asp:HyperLink>
        <asp:GridView ID="grdListUserGuide" CssClass="yui" Width="100%" runat="server" 
            AutoGenerateColumns="False" onrowdatabound="grdListUserGuide_RowDataBound" 
            AllowPaging="True" onpageindexchanging="grdListUserGuide_PageIndexChanging">
            <Columns>
                <asp:BoundField DataField="IDUserGuide" HeaderText="ID" />
                <asp:TemplateField HeaderText="Image">
                    <ItemTemplate>
                        <asp:Image ID="imgUserGuide" runat="server" style="height:50px" ImageUrl='<%#"~/Admin/img/UserGuide/"+Eval("ImageURL") %>' />
                    </ItemTemplate>
                </asp:TemplateField>
                <asp:HyperLinkField DataNavigateUrlFields="IDUserGuide" DataTextField="Title" 
                    HeaderText="Title" 
                    DataNavigateUrlFormatString="~/Admin/UserGuide.aspx?IdGuide={0}" />
                <asp:TemplateField HeaderText="Short Description">
                <ItemTemplate>
                <asp:Label ID="lblShortDes" runat="server" Text='<%#Eval(Server.HtmlEncode("ShortDescription" )) %>' ></asp:Label>
                </ItemTemplate>
                </asp:TemplateField>
                <asp:TemplateField HeaderText="Config">
                    <ItemTemplate>
                        <asp:ImageButton ID="btnUpdate" runat="server" ToolTip="Edit User Guide" CommandName="Confirm"
                            OnClick="btnUpdate_Click" CommandArgument='<%# Eval("IDUserGuide") %>' ImageUrl="~/Admin/img/config.png" />
                        &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                        <asp:ImageButton ID="btnConfirm" runat="server" ToolTip="Delete" CommandName="Delete"
                            OnClick="btnConfirm_Click" CommandArgument='<%# Eval("IDUserGuide") %>' ImageUrl="~/Admin/img/Del.png" />
                    </ItemTemplate>
                </asp:TemplateField>
            </Columns>
            <HeaderStyle CssClass="clsGrdHeader" />
            <RowStyle CssClass="clsGrdRow" />
            <AlternatingRowStyle CssClass="clsGrdAlternateRow" />
            <PagerStyle CssClass="clsPage" />
        </asp:GridView>
    </div>
</asp:Content>
